package com.key.org.service.serviceImp;

import com.key.base.service.serviceImp.BaseServiceImp;
import com.key.org.dao.IDepartmentDao;
import com.key.org.model.Department;
import com.key.org.service.IDepartmentService;

public class DepartmentServiceImp extends BaseServiceImp implements
		IDepartmentService {
	IDepartmentDao departmentDao;

	public IDepartmentDao getDepartmentDao() {
		return departmentDao;
	}

	public void setDepartmentDao(IDepartmentDao departmentDao) {
		this.departmentDao = departmentDao;
	}

	/**
	 * model
	 * 
	 * @param department
	 */
	@Override
	public void add(Department department) throws Exception {
		try {
			departmentDao.add(department);
		} catch (Exception e) {
			throw e;
		}
	}

	/**
	 * model
	 * 
	 * @param person
	 */
	@Override
	public void update(Department department) throws Exception {
		try {
			departmentDao.update(department);
		} catch (Exception e) {
			throw e;
		}
	}
}
